function HoraJS()
{
        
        var x = document.getElementById("hora");
        while (x.options.length > 0) {
                x.remove(0);
        }
        var option = document.createElement("option");
        var iaux;
        var jaux;
        var diaData = document.getElementById("data").value;
        var dataAtual = new Date();
        var mes = dataAtual.getMonth()+1;
        var dia = dataAtual.getDate();
        if(mes<10) {
                mes="0"+mes;
        }
        if(dia<10){
                dia ="0"+dia;
        }
        var diaAtual = dataAtual.getFullYear()+"-"+mes+"-"+dia;

        if(diaData==diaAtual){
        for( var i=dataAtual.getHours(); i<=23; i++) {
        for( var j=dataAtual.getMinutes();j<=59;j++){
                option = document.createElement("option");
                iaux = i;
                jaux = j;
                if (i < 10) {
                 iaux ="0"+i;
                  }
                if (j < 10) {
                 jaux ="0"+j;
                          }
                option.text = iaux+":"+jaux;
                        option.value = iaux+"-"+jaux;
                        x.add(option);
        }
        }
}
        else{
                for( var i=0; i<=23; i++) {
                for( var j=0;j<=45; j=j+15){
                        option = document.createElement("option");
                        iaux = i;
                        jaux = j;
                        if (i < 10) {
                         iaux ="0"+i;
                          }
                        if (j < 10) {
                         jaux ="0"+j;
                                  }
                        option.text = iaux+":"+jaux;
                                option.value = iaux+"-"+jaux;
                                x.add(option);
                }
                }
        }
}

function DataJS(){
        var x = document.getElementById("data");
        var data = new Date();
        var mes = data.getMonth()+1;
        var dia = data.getDate();
        if(mes<10) {
                mes="0"+mes;
        }
        if(dia<10){
                dia ="0"+dia;
        }
        x.min=data.getFullYear()+"-"+mes+"-"+dia;

}

function IndTotal(){
    var x = document.getElementById("pesquisa");
    if(x.options[x.selectedIndex].value=="total"){
    	document.getElementById("div1").style.display='none';
    	document.getElementById("div2").style.display='block';
    }
    else{
    	document.getElementById("div2").style.display='none';
    	document.getElementById("div1").style.display='block';
    }
}

